package pe.com.ztaxi.taxis.controller;

import java.security.Principal;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class LoginController {
	
	@RequestMapping(value = "/login", method = RequestMethod.GET)
	public String login(Principal currentUser, Model model) {
		if (currentUser != null) {
			System.out.println(currentUser.toString());
			return "intro";
		}
		return null;
	}
	
	@RequestMapping(value = "/403")
    public String accessDenied() {
          return "403";
     }

	
}
